import { getConfig } from '@/config/api';

const config = getConfig();

export const satellite = {
  version: 8,
  sprite: `${config.mapboxAssets}/style/sprite`,
  glyphs: `${config.mapboxAssets}/glyphs/mapbox/{fontstack}/{range}.pbf`,
  name: 'SatelliteMap',
  sources: {
    openmaptiles: {
      type: 'vector',
      scheme: 'tms',
      tiles: [
        `${config.geoServer}/gwc/service/tms/1.0.0/dz:planetchina@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,
      ],
    },
    gzsBuildings: {
      //包含guangdong和building 数据
      type: 'vector',
      scheme: 'tms',
      tiles: [
        `${config.geoServer}/gwc/service/tms/1.0.0/dz:gzbuildings@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,
      ],
    },
    bingSatellite: {
      type: 'raster',
      tiles: [
        // bingmap 卫星影像
        `${config.satelliteImagery}/783085212/{z}/{x}/{y}`,
      ],
      tileSize: 256,
      volatile: true,
      // crossOrigin: 'anonymous',
      // referrerPolicy: 'no-referrer'
    },
    dem: {
      type: 'raster-dem',
      tiles: [
        `${config.geoServer}/gwc/service/wmts?layer=dz:guangdong_3857_RGB&style=&tilematrixset=EPSG:3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:3857:{z}&TileCol={x}&TileRow={y}`,
      ],
      tileSize: 256,
      maxzoom: 14,
      volatile: true,
      bounds: [
        109.65069444444444, 20.214208386826517, 117.31368314409761,
        25.519861111111112,
      ],
    },
  },
  metadata: {
    'mapbox:autocomposite': false,
    'maputnik:renderer': 'mbgljs',
    'openmaptiles:version': '3.x',
  },
  terrain: {
    source: 'dem', // 数据源 ID
    exaggeration: 1.5, // 地形高度的夸张比例
  },
  fog: {
    range: [2, 20],
    color: 'hsl(0, 0%, 100%)',
    'high-color': 'hsl(210, 100%, 80%)',
    'space-color': [
      'interpolate',
      ['exponential', 1.2],
      ['zoom'],
      5,
      'hsl(210, 40%, 30%)',
      7,
      'hsl(210, 100%, 80%)',
    ],
    'horizon-blend': [
      'interpolate',
      ['exponential', 1.2],
      ['zoom'],
      5,
      0.02,
      7,
      0.08,
    ],
    'star-intensity': [
      'interpolate',
      ['exponential', 1.2],
      ['zoom'],
      5,
      0.1,
      7,
      0,
    ],
  },
  layers: [
    {
      //1个
      id: 'bingSatellite',
      type: 'raster',
      source: 'bingSatellite',
      minzoom: 0,
      maxzoom: 22,
    },
    {
      //3个
      id: 'waterway_tunnel',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'waterway',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['==', 'brunnel', 'tunnel'],
      ],
      layout: { visibility: 'visible' },
      paint: {
        'line-opacity': 0.7,
        'line-color': 'hsl(47, 26%, 88%)',
        'line-dasharray': [2, 4],
        'line-width': {
          base: 1.3,
          stops: [
            [14, 0.5],
            [20, 6],
          ],
        },
      },
    },
    {
      id: 'waterway',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'waterway',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['!=', 'intermittent', 1],
        ['!in', 'brunnel', 'tunnel', 'bridge'],
      ],
      layout: { visibility: 'none' },
      paint: {
        'line-color': '#a0c8f0',
        'line-opacity': 0.5,
        'line-width': {
          base: 1.4,
          stops: [
            [8, 1],
            [20, 8],
          ],
        },
      },
    },
    {
      id: 'waterway_intermittent',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'waterway',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['==', 'intermittent', 1],
        ['!in', 'brunnel', 'tunnel', 'bridge'],
      ],
      layout: { visibility: 'visible' },
      paint: {
        'line-color': 'hsl(207, 60%, 80%)',
        'line-dasharray': [2, 1],
        'line-opacity': 0.6,
        'line-width': {
          base: 1.4,
          stops: [
            [8, 1],
            [20, 8],
          ],
        },
      },
    },
    {
      //17个
      id: 'tunnel_railway_transit',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['==', 'brunnel', 'tunnel'],
        ['==', 'class', 'transit'],
      ],
      layout: { 'line-cap': 'butt', 'line-join': 'miter' },
      paint: {
        'line-color': 'hsl(30, 51%, 26%)',
        'line-dasharray': [3, 3],
        'line-opacity': {
          base: 1,
          stops: [
            [11, 0],
            [16, 1],
          ],
        },
      },
    },
    {
      id: 'road_area_pier',
      type: 'fill',
      metadata: {},
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'pier']],
      layout: { visibility: 'visible' },
      paint: {
        'fill-antialias': true,
        'fill-color': 'hsl(34, 12%, 66%)',
        'fill-opacity': 0.5,
      },
    },
    {
      id: 'road_pier',
      type: 'line',
      metadata: {},
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'pier']],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-width': {
          base: 1.2,
          stops: [
            [15, 1],
            [17, 4],
          ],
        },
      },
    },
    {
      id: 'road_bridge_area',
      type: 'fill',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: ['all', ['==', '$type', 'Polygon'], ['in', 'brunnel', 'bridge']],
      layout: {},
      paint: {
        'fill-color': 'hsl(34, 12%, 66%)',
        'fill-opacity': 0.5,
      },
    },
    {
      id: 'road_path',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['in', 'class', 'path', 'track'],
      ],
      layout: { 'line-cap': 'square', 'line-join': 'bevel' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-dasharray': [1, 1],
        'line-width': {
          base: 1.55,
          stops: [
            [4, 0.25],
            [20, 10],
          ],
        },
      },
    },
    {
      id: 'road_minor',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['in', 'class', 'minor', 'service'],
      ],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-width': {
          base: 1.55,
          stops: [
            [4, 0.25],
            [20, 30],
          ],
        },
      },
    },
    {
      id: 'tunnel_minor',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'minor_road']],
      ],
      layout: { 'line-cap': 'butt', 'line-join': 'miter' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-dasharray': [0.36, 0.18],
        'line-width': {
          base: 1.55,
          stops: [
            [4, 0.25],
            [20, 30],
          ],
        },
      },
    },
    {
      id: 'tunnel_major',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        [
          'all',
          ['==', 'brunnel', 'tunnel'],
          ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'],
        ],
      ],
      layout: { 'line-cap': 'butt', 'line-join': 'miter' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-dasharray': [0.28, 0.14],
        'line-width': {
          base: 1.4,
          stops: [
            [6, 0.5],
            [20, 30],
          ],
        },
      },
    },
    {
      id: 'road_trunk_primary',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 3,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['in', 'class', 'trunk', 'primary'],
      ],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-width': {
          base: 1.4,
          stops: [
            [6, 0.5],
            [20, 30],
          ],
        },
      },
    },
    {
      id: 'road_secondary_tertiary',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['in', 'class', 'secondary', 'tertiary'],
      ],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-width': {
          base: 1.4,
          stops: [
            [6, 0.5],
            [20, 20],
          ],
        },
      },
    },
    {
      id: 'road_major_motorway',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 3,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['==', 'class', 'motorway'],
      ],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-offset': 0,
        'line-width': {
          base: 1.4,
          stops: [
            [8, 1],
            [16, 10],
          ],
        },
      },
    },
    {
      id: 'railway_transit',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: ['all', ['==', 'class', 'transit'], ['!=', 'brunnel', 'tunnel']],
      layout: { visibility: 'visible' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-opacity': {
          base: 1,
          stops: [
            [11, 0],
            [16, 1],
          ],
        },
      },
    },
    {
      id: 'railway',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: ['==', 'class', 'rail'],
      layout: { visibility: 'visible' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-opacity': {
          base: 1,
          stops: [
            [11, 0],
            [16, 1],
          ],
        },
      },
    },
    {
      id: 'bridge_minor case',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'minor_road']],
      ],
      layout: { 'line-cap': 'butt', 'line-join': 'miter' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-gap-width': {
          base: 1.55,
          stops: [
            [4, 0.25],
            [20, 30],
          ],
        },
        'line-width': {
          base: 1.6,
          stops: [
            [12, 0.5],
            [20, 10],
          ],
        },
      },
    },
    {
      id: 'bridge_major case',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        [
          'all',
          ['==', 'brunnel', 'bridge'],
          ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'],
        ],
      ],
      layout: { 'line-cap': 'butt', 'line-join': 'miter' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-gap-width': {
          base: 1.55,
          stops: [
            [4, 0.25],
            [20, 30],
          ],
        },
        'line-width': {
          base: 1.6,
          stops: [
            [12, 0.5],
            [20, 10],
          ],
        },
      },
    },
    {
      id: 'bridge_minor',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'minor_road']],
      ],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-width': {
          base: 1.55,
          stops: [
            [4, 0.25],
            [20, 30],
          ],
        },
      },
    },
    {
      id: 'bridge_major',
      type: 'line',
      source: 'openmaptiles',
      'source-layer': 'transportation',
      minzoom: 14,
      filter: [
        'all',
        ['==', '$type', 'LineString'],
        [
          'all',
          ['==', 'brunnel', 'bridge'],
          ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'],
        ],
      ],
      layout: { 'line-cap': 'round', 'line-join': 'round' },
      paint: {
        'line-color': 'hsl(34, 12%, 66%)',
        'line-width': {
          base: 1.4,
          stops: [
            [6, 0.5],
            [20, 30],
          ],
        },
      },
    },
    {
      //1个
      id: 'road_major_label',
      type: 'symbol',
      source: 'openmaptiles',
      'source-layer': 'transportation_name',
      minzoom: 14,
      filter: ['==', '$type', 'LineString'],
      layout: {
        'symbol-placement': 'line',
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-letter-spacing': 0.1,
        'text-rotation-alignment': 'map',
        'text-size': {
          base: 1.4,
          stops: [
            [10, 8],
            [20, 14],
          ],
        },
        'text-transform': 'uppercase',
      },
      paint: {
        'text-color': '#000',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 2,
      },
    },
    // {//3个
    //   "id": "admin_sub",
    //   "type": "line",
    //   "source": "openmaptiles",
    //   "source-layer": "boundary",
    //   "minzoom": 0,
    //   "filter": ["in", "admin_level", 4, 6, 8],
    //   "layout": { "visibility": "visible" },
    //   "paint": { "line-color": "hsl(34, 12%, 66%)", "line-dasharray": [2, 1] }
    // },
    // {
    //   "id": "admin_country_z0-4",
    //   "type": "line",
    //   "source": "openmaptiles",
    //   "source-layer": "boundary",
    //   "maxzoom": 5,
    //   "filter": [
    //     "all",
    //     ["<=", "admin_level", 2],
    //     ["==", "$type", "LineString"],
    //     ["!has", "claimed_by"]
    //   ],
    //   "layout": { "line-cap": "round", "line-join": "round" },
    //   "paint": {
    //     "line-color": "hsla(0, 8%, 22%, 0.51)",
    //     "line-width": { "base": 1.3, "stops": [[3, 0.5], [22, 15]] }
    //   }
    // },
    // {
    //   "id": "admin_country_z5-",
    //   "type": "line",
    //   "source": "openmaptiles",
    //   "source-layer": "boundary",
    //   "minzoom": 5,
    //   "filter": [
    //     "all",
    //     ["<=", "admin_level", 2],
    //     ["==", "$type", "LineString"]
    //   ],
    //   "layout": { "line-cap": "round", "line-join": "round" },
    //   "paint": {
    //     "line-color": "hsla(0, 8%, 22%, 0.51)",
    //     "line-width": { "base": 1.3, "stops": [[3, 0.5], [22, 15]] }
    //   }
    // },
    {
      //7个
      id: 'place_label_other',
      type: 'symbol',
      source: 'openmaptiles',
      'source-layer': 'place',
      minzoom: 12,
      filter: [
        'all',
        ['in', 'class', 'hamlet', 'neighbourhood', 'isolated_dwelling'],
        ['==', '$type', 'Point'],
      ],
      layout: {
        'text-anchor': 'center',
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-max-width': 6,
        'text-size': {
          stops: [
            [6, 10],
            [12, 14],
          ],
        },
        visibility: 'visible',
      },
      paint: {
        'text-color': 'hsl(0, 10%, 25%)',
        'text-halo-blur': 0,
        'text-halo-color': 'hsl(34, 12%, 66%)',
        'text-halo-width': 2,
      },
    },
    {
      id: 'place_suburb',
      type: 'symbol',
      metadata: { 'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f' },
      source: 'openmaptiles',
      'source-layer': 'place',
      minzoom: 14,
      filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'suburb']],
      layout: {
        'text-anchor': 'center',
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-justify': 'center',
        'text-offset': [0.5, 0],
        'text-size': 10,
        'text-transform': 'uppercase',
        visibility: 'visible',
      },
      paint: {
        'text-color': 'hsl(0, 10%, 25%)',
        'text-halo-blur': 1,
        'text-halo-color': 'hsla(0, 0%, 100%, 0.75)',
        'text-halo-width': 1,
      },
    },
    {
      id: 'place_village',
      type: 'symbol',
      metadata: { 'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f' },
      source: 'openmaptiles',
      'source-layer': 'place',
      minzoom: 14,
      filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'village']],
      layout: {
        'icon-size': 0.4,
        'text-anchor': 'left',
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-justify': 'left',
        'text-offset': [0.5, 0.2],
        'text-size': 10,
        'text-transform': 'uppercase',
        visibility: 'visible',
      },
      paint: {
        'icon-opacity': 0.7,
        'text-color': 'hsl(0, 10%, 25%)',
        'text-halo-blur': 1,
        'text-halo-color': 'hsla(0, 0%, 100%, 0.75)',
        'text-halo-width': 1,
      },
    },
    {
      id: 'place_town',
      type: 'symbol',
      metadata: { 'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f' },
      source: 'openmaptiles',
      'source-layer': 'place',
      minzoom: 12,
      filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'town']],
      layout: {
        'icon-image': {
          base: 1,
          stops: [
            [0, 'circle-11'],
            [9, ''],
          ],
        },
        'icon-size': 0.4,
        'text-anchor': {
          base: 1,
          stops: [
            [0, 'left'],
            [8, 'center'],
          ],
        },
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-justify': 'left',
        'text-offset': [0.5, 0.2],
        'text-size': 10,
        'text-transform': 'uppercase',
        visibility: 'visible',
      },
      paint: {
        'text-color': 'hsl(0, 10%, 25%)',
        'text-halo-blur': 0,
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 2,
      },
    },
    {
      id: 'place_city_large',
      type: 'symbol',
      metadata: { 'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f' },
      source: 'openmaptiles',
      'source-layer': 'place',
      maxzoom: 7,
      filter: [
        'all',
        ['==', '$type', 'Point'],
        ['all', ['<=', 'rank', 3], ['==', 'class', 'city']],
      ],
      layout: {
        'icon-size': 0.4,
        'text-anchor': {
          base: 1,
          stops: [
            [0, 'left'],
            [8, 'center'],
          ],
        },
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-justify': 'left',
        'text-offset': [0.5, 0.2],
        'text-size': 14,
        'text-transform': 'uppercase',
        visibility: 'visible',
      },
      paint: {
        'text-color': 'hsl(0, 0%, 0%)',
        'text-halo-blur': 0,
        'text-halo-color': 'hsla(0, 0%, 100%, 0.75)',
        'text-halo-width': 2,
      },
    },
    {
      id: 'place_state',
      type: 'symbol',
      metadata: { 'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f' },
      source: 'openmaptiles',
      'source-layer': 'place',
      maxzoom: 8,
      filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'state']],
      layout: {
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-transform': 'uppercase',
        visibility: 'visible',
      },
      paint: {
        'text-color': 'hsl(0, 0%, 0%)',
        'text-halo-blur': 0,
        'text-halo-color': 'hsla(0, 0%, 100%, 0.75)',
        'text-halo-width': 2,
      },
    },
    {
      id: 'country_label',
      type: 'symbol',
      source: 'openmaptiles',
      'source-layer': 'place',
      maxzoom: 12,
      filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'country']],
      layout: {
        'text-field': ['coalesce', ['get', 'name:zh'], ['get', 'name']],
        'text-font': ['DIN Pro Regular', 'Arial Unicode MS Regular'],
        'text-max-width': 10,
        'text-size': {
          stops: [
            [3, 12],
            [8, 22],
          ],
        },
      },
      paint: {
        'text-color': 'hsl(0, 0%, 0%)',
        'text-halo-blur': 0,
        'text-halo-color': 'hsla(0, 0%, 100%, 0.75)',
        'text-halo-width': 2,
      },
    },
    {
      //1个
      id: 'guangzhou-3d',
      type: 'fill-extrusion',
      source: 'gzsBuildings',
      'source-layer': 'guangzhou',
      minzoom: 14,
      filter: ['all', ['!has', 'hide_3d']],
      paint: {
        'fill-extrusion-color': [
          'interpolate',
          ['linear'],
          ['get', 'Height'],
          0,
          'hsl(39, 20%, 86%)',
          75,
          'hsl(39, 41%, 86%)',
          150,
          'hsl(39, 61%, 86%)',
        ],
        'fill-extrusion-height': ['get', 'Height'],
        'fill-extrusion-opacity': 0.6,
      },
    },
    {
      //1个
      id: 'building-3d',
      type: 'fill-extrusion',
      source: 'gzsBuildings',
      'source-layer': 'building',
      minzoom: 14,
      filter: ['all', ['!has', 'hide_3d']],
      paint: {
        'fill-extrusion-base': {
          property: 'render_min_height',
          type: 'identity',
        },
        'fill-extrusion-color': [
          'case',
          ['has', 'colour'],
          ['get', 'colour'],
          'hsl(39,20%,86%)',
        ],
        'fill-extrusion-height': {
          property: 'render_height',
          type: 'identity',
        },
        'fill-extrusion-opacity': 1,
      },
    },
  ],
};
